home *** CD-ROM | disk | FTP | other *** search
/ Hackers Handbook - Millenium Edition / Hackers Handbook.iso / library / hack / aol_aim.txt < prev    next >
Encoding:
Text File  |  1998-07-23  |  3.3 KB  |  76 lines

  1. AOL Instant Messenger (AIM) protocol information and password decoder
  2. by james@foo.org
  3.  
  4. A quick note: please, do not kick and scream if this is old news; I
  5. don't really watch these things and this is the first I've seen.
  6.  
  7.  AOL Instant Messenger doesn't seem to make too much a point of
  8.  security. Security really isn't very friendly though, and it sure
  9.  would slow a large system like AOL down.
  10.  
  11.  I've successfully signed on to the AIM network illicitly using
  12.  a couple  different methods. You may say "So? This is just a chat
  13.  network." That excuse doesn't work, look at how many people use
  14.  it every day.
  15.  
  16.  
  17.  First, the hash that AIM uses to "encrypt" user passwords going
  18.  over the network is awful. I can only assume that it's not meant
  19.  to provide any security at all, in which case .. *sigh*
  20.  
  21.  An AIM password must be between 4 and 16 characters. I got this from
  22.  the AIM "Change your Password" screen. When the AIM client signs on
  23.  to the authorizer, the encoded password presented is the same length
  24.  as the decoded form. After a little number crunching, I've found
  25.  that the hash used to encode the password looks like this:
  26.  
  27.  u_char hash[16] = { 243, 179, 108, 153, 149, 63, 172, 182,
  28.                      197, 250, 107, 99, 105, 108, 195, 154 };
  29.  
  30.  The user password is simply XOR'ed with this. All the server has to
  31.  do is XOR this hash with the encoded password to get the original
  32.  text. In other words:
  33.  
  34.          for (i = 0; i < 16; i ++)
  35.            crypt_pw = cleartext_pw[i] ^ hash[i];
  36.  
  37.  As far as I can tell, this data is static; it's used by all the
  38.  clients I've played with anyway (AIM for Windows '95 and AIM for
  39.  Java version 1.2). It may be different for different versions of the
  40.  client, but the client sends it's version information over the wire
  41.  too so this is a moot point.
  42.  
  43.  If you sniff a user's connection to the authorizer you have yourself
  44.  the user's cleartext password and can do with it what you will.
  45.  Impersonate them, deny them access to AIM, etc.
  46.  
  47.  There are a number of alternative ways to do this simple password
  48.  authentication, and not all of them require fancy (read: slow)
  49.  encryption.
  50.  
  51.  This next method isn't as sexy as the previous, but it works nonetheless.
  52.  
  53.  Once the AIM client has authenticated once, it never has to do it again.
  54.  The server sends it a cookie, much like a Kerberos KDC gives a client a
  55.  TGT. The cookie lets a user signon quickly to another service.
  56.  
  57.  But what happens if you can get that cookie? You can steal a user's
  58.  cookie, flood the user or reset their connection so that they can't
  59.  reach the destination server, and login with their cookie yourself. I
  60.  have only tried this with the BOS server; it will probably work just
  61.  as well with the ad servers, chat & chatnav servers, and the directory
  62.  servers. I assume they all run basically the same server software,
  63.  with software modules that plug-in to provide the various services.
  64.  
  65.  The server's appear to be doing some sort of traffic filtering at the
  66.  transport level. If my host hasn't been given a cookie, it won't let me
  67.  connect to any services. This traffic filtering does not seem to be tied
  68.  to the cookie however; as long as you have a legitamate reason for
  69.  connecting to the server it will let you on.
  70.  
  71.  Wouldn't it be fun to sneak up on an AOL staff person, sniff their
  72.  traffic, and find out if they have access to any "hidden" commands? :-)
  73.  
  74.  
  75.  
  76.  21 June 1998, james@foo.org